package cyou.breathe.blog.article.domain.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import cyou.breathe.blog.api.tag.request.ArticleTagCreateRequest;
import cyou.breathe.blog.api.tag.request.ArticleTagUpdateRequest;
import cyou.breathe.blog.datasource.domain.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

/**
 * @author: breathe
 * @createTime: 2025-08-29
 */
@Setter
@Getter
@TableName("article_tags")
public class ArticleTag extends BaseEntity {

    private Long userId;

    private String tagName;

    public ArticleTag createArticleTag(ArticleTagCreateRequest articleTagCreateRequest) {
        this.userId = articleTagCreateRequest.getUserId();
        this.tagName = articleTagCreateRequest.getTagName();
        return this;
    }

    public ArticleTag updateArticleTag(ArticleTagUpdateRequest articleTagUpdateRequest) {
        this.tagName = articleTagUpdateRequest.getTagName();

        return this;
    }
}
